package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import java.util.Locale;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.StreamAliasContext;

public class SourceAliasVisitor extends AbsCQLParserBaseVisitor<String>{

	private String context = null;
	
	public SourceAliasVisitor() {
	}
	
	@Override
	protected String defaultResult() {
		return context;
	}
	
	@Override
	public String visitStreamAlias(@NotNull StreamAliasContext ctx) {
		context = ctx.getText().toLowerCase(Locale.US);
        return context;
	}

}
